import React, {useState} from 'react';
import style from './MyRecordList.module.scss'
import {Avatar, Space} from "antd";
import {HistoryOutlined, UserOutlined} from "@ant-design/icons";
import wangeditorCss from '../../wangeditor.module.scss'

function MyRecordList(props) {
    const imgUrl = props.adminUserData.userPhotoUrl
    return (
        <div className={style.MyRecordList}>
            {/*//左边头像部分*/}
            <div className={style.MyRecordListLeft}>
                <Space wrap size={16}>
                    <Avatar shape="square" src={imgUrl} size={64} icon={<UserOutlined/>}/>
                </Space>
            </div>
            {/*// 右边部分*/}
            <div className={style.MyRecordListRight}>
                {/*名称*/}
                <div className={style.MyRecordListRight_Name}>
                    <span>{props.adminUserData.userName}</span>
                </div>
                {/*内容*/}
                <div className={style.MyRecordListRight_Substance}>
                    <div className={wangeditorCss.editorContentView}
                         dangerouslySetInnerHTML={{__html: props.text}}>
                    </div>
                </div>
                {/*点赞*/}
                <div className={style.MyRecordListRight_operate}>
                    {/*日期*/}
                    <div><HistoryOutlined/>{props.createdAt}</div>
                </div>
            </div>
            <div className={style.MyRecordListLeft}>
            </div>
        </div>
    );
}

export default MyRecordList;
